// AWTScrollPanePeer.cpp : implementation file
//

#include "stdafx.h"
#include "awt.h"
#include "AWTScrollPanePeer.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// AWTScrollPanePeer

AWTScrollPanePeer::AWTScrollPanePeer(AWTComponent* comp)
{
	m_comp = comp;
	m_AWTWindow = NULL;		
}

AWTScrollPanePeer::~AWTScrollPanePeer()
{
}


BEGIN_MESSAGE_MAP(AWTScrollPanePeer, CWnd)
	//{{AFX_MSG_MAP(AWTScrollPanePeer)
	ON_WM_HSCROLL()
	ON_WM_VSCROLL()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// AWTScrollPanePeer message handlers

void AWTScrollPanePeer::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
/*
	AWTScrollPane* comp = (AWTScrollPane*)m_comp;
	switch (nSBCode)
	{
		case SB_LINERIGHT:
			{
			if (m_value < m_max)
			{
				m_value += m_lineIncrement;
				if (m_value > m_max) m_value = m_max;
				AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::BLOCK_INCREMENT, AWTAdjustmentEvent::BLOCK_INCREMENT, m_value);
				comp->processAdjustmentEvent(&e);			
			}
			break;
			}
		case SB_LINELEFT:
			{
			if (m_value > m_min)
			{
				m_value -= m_lineIncrement;
				if (m_value < m_min) m_value = m_min;
				AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::BLOCK_DECREMENT, AWTAdjustmentEvent::BLOCK_DECREMENT, m_value);
				comp->processAdjustmentEvent(&e);			
			}
			break;
			}
		case SB_PAGERIGHT:
			{
			if (m_value < m_max)
			{
				m_value += m_pageIncrement;
				if (m_value > m_max) m_value = m_max;
				AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::UNIT_INCREMENT, AWTAdjustmentEvent::UNIT_INCREMENT, m_value);
				comp->processAdjustmentEvent(&e);			
			}
			break;
			}
		case SB_PAGELEFT:
			{
			if (m_value > m_min)
			{
				m_value -= m_pageIncrement;
				if (m_value < m_min) m_value = m_min;
				AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::UNIT_DECREMENT, AWTAdjustmentEvent::UNIT_DECREMENT, m_value);
				comp->processAdjustmentEvent(&e);			
			}
			break;
		case SB_THUMBPOSITION:
			{
			m_value = nPos;	
			AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::TRACK, AWTAdjustmentEvent::TRACK, m_value);
			comp->processAdjustmentEvent(&e);			
			}
			break;
		case SB_THUMBTRACK:
			{
			m_value = nPos;	
			AWTAdjustmentEvent e(m_comp, AWTAdjustmentEvent::TRACK, AWTAdjustmentEvent::TRACK, m_value);
			comp->processAdjustmentEvent(&e);			
			}
			break;
		}
	}
	SetScrollPos(m_value);
*/	
	CWnd::OnHScroll(nSBCode, nPos, pScrollBar);
}

void AWTScrollPanePeer::OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) 
{
	// TODO: Add your message handler code here and/or call default
	
	CWnd::OnVScroll(nSBCode, nPos, pScrollBar);
}
